import {generateList} from '@/common/helper.js'

class Data {
	constructor() {
		this.cateRaws = this.getCates();
	}
	
	async getCates() {
		const cates = generateList(3, function(index) {
			return {
				name: '西区院区' + index,
				children: [
					{
						name: '内科' + index,
						children: [
							{
								name: '神经内科',
								url:'../../pages/login/login'
							},
							{
								name: '神经内科',
								url:''
								
							},
							{
								name: '神经内科',
								url:''
								
							},
							{
								name: '神经内科',
								url:''
							
							},
							{
								name: '神经内科',
								url:''
								
							}
						]
					},
					
				]
			}
		})
		
		return cates;
	}
	
	async cates() {
		return this.cateRaws;
	}
	
	async cateTabTitles() {
		return (await this.cateRaws).map(item => item.name);
	}
};

export default new Data();